/*
 */
package org.beetl.ext.fn;

import org.beetl.core.Context;
import org.beetl.core.Function;

import cn.hutool.core.util.StrUtil;

/**
 * 驼峰-大写
 * @author apple
 *
 */
public class CamelCaseUpperFirst implements Function
{

	public Object call(Object[] paras, Context ctx)
	{
		Object obj = paras[0];
		
		if(obj==null){
			return null;
		}
		String str = obj.toString();
		str = StrUtil.toCamelCase(str);
		return StrUtil.upperFirst(str);
	}

	
	public static void main(String[] args) {
		String str = "_id";
		str = StrUtil.toCamelCase(str);
		System.out.println(StrUtil.upperFirst(str));
	}
}
